package com.wbu.estatemanagement.domain;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * Author:wanqi
 */

@Table(name = "tb_device")
public class Device {
    @Id
    private Integer id;  //设备ID

    private String communityName;  //社区名称

    private String communityId;  //社区ID

    private String code;  //设备编号

    private String name;  //设备名称

    private String brand;  //设备品牌

    private Integer unitPrice;  //购买单价

    private Integer num;  //购买数量

    private String usefulYear;  //预计使用年限(年)

    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    private Date purchaseDate;  //购买日期

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCommunityName() {
        return communityName;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }

    public String getCommunityId() {
        return communityId;
    }

    public void setCommunityId(String communityId) {
        this.communityId = communityId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public Integer getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(Integer unitPrice) {
        this.unitPrice = unitPrice;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getUsefulYear() {
        return usefulYear;
    }

    public void setUsefulYear(String usefulYear) {
        this.usefulYear = usefulYear;
    }

    public Date getPurchaseDate() {
        return purchaseDate;
    }

    public void setPurchaseDate(Date purchaseDate) {
        this.purchaseDate = purchaseDate;
    }
}
